package cn.com.thinker.security.sdk.shiro.token;

import cn.com.thinker.security.sdk.sso.model.EncryCredentialInfo;

import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.RememberMeAuthenticationToken;

/**
 * Created by crazyHC on 2017/7/4.
 */
public class SsoToken implements RememberMeAuthenticationToken {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private EncryCredentialInfo ticket = null;

    private String userId = null;

    private boolean isRememberMe = false;
    
    private String username;
    private String password;
    private String captcha;
    private String name;
    

    public SsoToken(EncryCredentialInfo encryCredentialInfo){
        userId = encryCredentialInfo.getUserId();
        ticket = encryCredentialInfo;
    }

    public Object getPrincipal() {
        return userId;
    }

    public Object getCredentials() {
        return ticket;
    }

    public boolean isRememberMe() {
        return isRememberMe;
    }

	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCaptcha() {
		return captcha;
	}

	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

}
